package com.hoshino.momochi.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class Focus {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("local_id")
    private Long localId;

    @TableField("focus_id")
    private Long focusId;

    @TableField(value = "create_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField("isDelete")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) // 禁止 序列化
    private int isDelete;

    @TableField(exist = false)
    private UserDetails localDetails; // 我作为关注者，关注的人的信息

    @TableField(exist = false)
    private UserDetails focusDetails; // 我作为被关注者，我的粉丝的信息

    public Long getLocalId() {
        return localId;
    }

    public void setLocalId(Long localId) {
        this.localId = localId;
    }

    public Long getFocusId() {
        return focusId;
    }

    public void setFocusId(Long focusId) {
        this.focusId = focusId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
